﻿namespace Seagull.Foundation
{
    /// <summary>
    /// 定义 
    /// <typeparamref name="TEvent"/>
    /// 的处理程序
    /// </summary>
    /// <typeparam name="TEvent">正在处理的 Event 的类型。</typeparam>
    public interface IEventHandler<TEvent> where TEvent : IEvent
    {
        /// <summary>
        /// <typeparamref name="TEvent"/>
        /// 的事件处理程序
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        Task Handle(EventContext<TEvent> context);
    }
}
